<?php

namespace common\validate;

class Timelog extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    // AddTimer 验证场景定义
    public function sceneAddTimer()
    {
        return $this->append('data.module_code', 'require|max:128')
            ->append('data.link_id', 'require');
    }

    // StopTimer 验证场景定义
    public function sceneStopTimer()
    {
        return $this->append('data.id', 'require');
    }

    // StopTimerByFilter 验证场景定义
    public function sceneStopTimerByFilter()
    {
        return $this->append("param.filter", "require|array")
            ->append("param.module_code", "require");
    }

    public function sceneTimeLogCorrect()
    {
        return $this->append("param.filter", "require")
            ->append("param.data", "require");
    }

    // GetLatestExecuteTimer 验证场景定义
    public function sceneGetLatestExecuteTimer()
    {
        return $this->append("param.module_code", "require");
    }

}
